home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Univers Interactif 3
/
INTERACTIF.BIN
/
pc
/
planeten
/
internet
/
intersl3.sit
/
InterslipRedialScript folder
/
InterslipRedialScript
next >
Wrap
Text File
|
1994-12-29
|
3KB
|
98 lines
!Redial ⌐ 1994 Snap Systems, snap@netcom.com, on 94-12-25
!permission to freely distribute granted as long as copyright message not modified
!redial is a dialing script for InterSLIP written by Mark Hickenbottom
!put in System Folder:Preferences:InterSLIP Folder:Dialing Scripts
!advantages over the built-in script:
!1: Written specifically for InterSLIP (not an ARA script).
!2: Comments included in the script for anyone who wishes to modify the script.
!3: Compatible with all modems, including older modems connected to fast computers.
!4: Informs the user to connect and power on the modem, if needed.
!5: Informs the user to connect the phone line, if needed.
!6: Shows the phone number when dialing.
!7: Shows the connect rate when connected.
!8: Shows the error message if any.
!9: Turns off the status lights when done.
!10: And most important: Redials when the line is busy!
@ORIGINATE
note "Connect and turn on modem right now."
pause 1
write "AT\13"
note "Redial ⌐ 1994 Snap Systems"
matchstr 1 1 "OK"
matchread 50
write "AT\13"
matchread 10
note "No modem. Check modem power and cable."
pause 30
exit -1
!check for connected and powered modem
!in certain cases, InterSLIP freezes when modem is not connected
!in such cases, user must connect and power modem before continuing
!pause 1 required to show note before writing to modem
!if pause not there, note does not show up
!modem message quickly disappears when modem is connected
!matchstr is form: matchstr <matchbuffer> <jumplabel> <stringtomatch>
!matchstr sets up buffer but does not jump
!matchread <delay> waits for match and jumps to <jumplabel> if match
@LABEL 1
write "^4M^2\13"
matchstr 1 2 "OK"
matchread 10
!writes the initialization string ^4 stored in InterSLIP to modem
!writes the speaker string ^2 which has the value 0 or 1
@LABEL 2
write "ATDT^1\13"
note "Dialing ^1"
matchclr
matchstr 1 3 "BUSY"
matchexp 2 4 "CONNECT ....."
matchexp 3 5 "ERRO."
matchexp 4 5 "NO ANSWE."
matchexp 5 5 "NO CARRIE."
matchstr 6 6 "NO DIALTONE"
matchread 600
note "No response from modem."
exit -1
!dials the number ^1 stored in InterSLIP and jumps according to response
!matchexp similar to matchread except periods match any character
!matchexp stores result in ^0
@LABEL 3
note "Busy. Redialing momentarily..."
pause 30
jump 2
@LABEL 4
note "^0"
pause 1
exit 0
!displays the result ^0 stored by matchexp such as CONNECT 57600
@LABEL 5
note "^0"
pause 30
exit -1
!displays the result ^0 stored by matchexp such as NO CARRIER
@LABEL 6
note "No dialtone. Check your phone cord."
pause 30
exit -1
@HANGUP
pause 11
write "+++"
pause 11
write "ATH0\13"
pause 11
exit 0
!InterSLIP doesn't seem to return responses during the hangup procedure
!since responses aren't returned, no matchstr's or matchexp's are used
!one second pause is required for the escape guard time
!escape guard time is the delay required between the last character written and +++
!pauses are in 10ths of seconds, so 11 would be 1.1 seconds
!InterSLIP documentation is not correct when it says pauses are in 60ths of a second